<template>
	<view class="mycertificateDetails">
		<view class="mycertificateDetails-box">
			<text style="font-size: 60rpx;font-family: Source Han Sans CN;font-weight: bold;color: #333333;">证书</text>
		</view>
		<view class="tips">
			长按图片，即可保存至手机
		</view>
		<!-- <button open-type="share" class="share" @click="shareClick">分享我的公益证书</button> -->
		<button class="share" @click="shareClick">分享我的公益证书</button>
		<u-popup :show="show" mode="bottom" :borderRadius="20" @close="close" @open="open" v-model='show'>
			<view class="relative">
				<view class="share-text">
					分享至
				</view>
				<view style="display: flex;justify-content: space-between;">
					<view class="share-box" v-for="(item,index) in list">
						<image style="width: 60rpx;height: 60rpx;" :src="item.img" mode=""></image>
						<text>{{item.text}}</text>
					</view>
					
				</view>
			</view>
		</u-popup>
	</view>
</template>

<script>
	export default {
		data() {
			return {
				show: false,
				list:[{
					img:require('../../../static/publicwelfare/wxfirends.png'),
					text:'微信好友'
				},{
					img:require('../../../static/publicwelfare/wxpyq.png'),
					text:'微信朋友圈'
				},{
					img:require('../../../static/publicwelfare/qqfirends.png'),
					text:'QQ好友'
				},{
					img:require('../../../static/publicwelfare/qqkongjian.png'),
					text:'QQ空间'
				},{
					img:require('../../../static/publicwelfare/fuzhilianjie.png'),
					text:'复制链接'
				},]
			}
		},
		methods: {
			open() {
				console.log('open')
			},
			close() {
				this.show = false
				// console.log('close')
			},
			shareClick() {
				this.show = true
				// uni.share({
				//     provider: "weixin",
				//     scene: "WXSceneSession",
				//     type: 1,
				//     summary: "我正在使用HBuilderX开发uni-app，赶紧跟我一起来体验！",
				//     success: function (res) {
				//         console.log("success:" + JSON.stringify(res));
				//     },
				//     fail: function (err) {
				//         console.log("fail:" + JSON.stringify(err));
				//     }
				// });
			}
		}
	}
</script>

<style scoped lang="less">
	.relative {
		width: 100%;
		height: 254rpx;
		background: #FFFFFF;
		opacity: 1;
		border-radius: 20rpx 20rpx 0px 0px;
		padding: 40rpx;
		.share-text{
			font-size: 32rpx;
			font-family: Source Han Sans CN;
			font-weight: 400;
			color: #999999;
			margin-bottom: 40rpx;
		}
		.share-box{
			flex: 1;
			display: flex;
			flex-direction: column;
			align-items: center;
			text{
				font-size: 24rpx;
				font-family: Source Han Sans CN;
				font-weight: 400;
				color: #999999;
				margin-top: 10rpx;
			}
		}
	}

	.mycertificateDetails {
		padding-bottom: 70rpx;
		padding: 68rpx;
		display: flex;
		flex-direction: column;
		justify-content: center;
		align-items: center;

		.share {
			width: 478rpx;
			height: 96rpx;
			line-height: 96rpx;
			text-align: center;
			color: #ffffff;
			font-size: 32rpx;
			background: #FF7200;
			opacity: 1;
			border-radius: 48rpx;
		}

		.tips {
			margin: 52rpx;
			font-size: 28rpx;
			font-family: Source Han Sans CN;
			font-weight: 400;
			color: #C4C4C4;
		}

		.mycertificateDetails-box {
			width: 100%;
			height: 1038rpx;
			background: #FFFFFF;
			border: 2rpx solid #707070;
			opacity: 1;
			border-radius: 0px;
			display: flex;
			align-items: center;
			justify-content: center;
		}
	}
</style>
